package com.baor.order.service.impl;

import java.util.List;
import com.baor.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baor.order.mapper.TShopaddressMapper;
import com.baor.order.domain.TShopaddress;
import com.baor.order.service.ITShopaddressService;

/**
 * 商家地址Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-18
 */
@Service
public class TShopaddressServiceImpl implements ITShopaddressService 
{
    @Autowired
    private TShopaddressMapper tShopaddressMapper;

    /**
     * 查询商家地址
     * 
     * @param shopaddressId 商家地址主键
     * @return 商家地址
     */
    @Override
    public TShopaddress selectTShopaddressByShopaddressId(Long shopaddressId)
    {
        return tShopaddressMapper.selectTShopaddressByShopaddressId(shopaddressId);
    }

    /**
     * 查询商家地址列表
     * 
     * @param tShopaddress 商家地址
     * @return 商家地址
     */
    @Override
    public List<TShopaddress> selectTShopaddressList(TShopaddress tShopaddress)
    {
        return tShopaddressMapper.selectTShopaddressList(tShopaddress);
    }

    /**
     * 新增商家地址
     * 
     * @param tShopaddress 商家地址
     * @return 结果
     */
    @Override
    public int insertTShopaddress(TShopaddress tShopaddress)
    {
        tShopaddress.setCreateTime(DateUtils.getNowDate());
        return tShopaddressMapper.insertTShopaddress(tShopaddress);
    }

    /**
     * 修改商家地址
     * 
     * @param tShopaddress 商家地址
     * @return 结果
     */
    @Override
    public int updateTShopaddress(TShopaddress tShopaddress)
    {
        return tShopaddressMapper.updateTShopaddress(tShopaddress);
    }

    @Override
    public int deleteTShopaddress(TShopaddress tShopaddress) {
        return tShopaddressMapper.deleteTShopaddress(tShopaddress);
    }

    /**
     * 批量删除商家地址
     * 
     * @param shopaddressIds 需要删除的商家地址主键
     * @return 结果
     */
    @Override
    public int deleteTShopaddressByShopaddressIds(Long[] shopaddressIds)
    {
        return tShopaddressMapper.deleteTShopaddressByShopaddressIds(shopaddressIds);
    }

    /**
     * 删除商家地址信息
     * 
     * @param shopaddressId 商家地址主键
     * @return 结果
     */
    @Override
    public int deleteTShopaddressByShopaddressId(Long shopaddressId)
    {
        return tShopaddressMapper.deleteTShopaddressByShopaddressId(shopaddressId);
    }
}
